# -*-coding:utf-8-*-

ids_text = '''
62EF4CE1BB800001
2CF44CE1BB800002
997D4CE1BB800003
9EED4CE1BB800004
5B814CE1BB800005
5A2A4CE1BB800006
F6194CE1BB800007
52C14CE1BB800008
FBAE4CE1BB800009
9F0F4CE1BB800010
87E84CE1BB800011
5BEE4CE1BB800012
88D84CE1BB800013
BF4C4CE1BB800014
A00F4CE1BB800015
0CC24CE1BB800016
DF094CE1BB800017
8F354CE1BB800018
2C864CE1BB800019
2E6D4CE1BB800020
249E4CE1BB800021
A9534CE1BB800022
9B4B4CE1BB800023
1A724CE1BB800024
924A4CE1BB800025
3B5F4CE1BB800026
E9244CE1BB800027
4D4C4CE1BB800028
48534CE1BB800029
FB684CE1BB800030
82AF4CE1BB800031
E0534CE1BB800032
46584CE1BB800033
8B0E4CE1BB800034
C4F04CE1BB800035
BD3A4CE1BB800036
068B4CE1BB800037
1E264CE1BB800038
FF914CE1BB800039
6F494CE1BB800040
8BE84CE1BB800041
D6A04CE1BB800042
83FE4CE1BB800043
3BE34CE1BB800044
E1A24CE1BB800045
CF5E4CE1BB800046
E30C4CE1BB800047
7A274CE1BB800048
5F9E4CE1BB800049
D2EF4CE1BB800050
89954CE1BB800051
93774CE1BB800052
3B4A4CE1BB800053
7DCD4CE1BB800054
A1BD4CE1BB800055
62D54CE1BB800056
F73A4CE1BB800057
96FF4CE1BB800058
24E74CE1BB800059
2CBE4CE1BB800060
D3274CE1BB800061
75FA4CE1BB800062
603E4CE1BB800063
41844CE1BB800064
DEAB4CE1BB800065
0FDA4CE1BB800066
70204CE1BB800067
C3184CE1BB800068
A5D84CE1BB800069
FDAD4CE1BB800070
BB964CE1BB800071
A1234CE1BB800072
EEC94CE1BB800073
A9DD4CE1BB800074
FC434CE1BB800075
BED84CE1BB800076
02274CE1BB800077
ACF64CE1BB800078
E7F94CE1BB800079
DFE84CE1BB800080
0CCC4CE1BB800081
65914CE1BB800082
54094CE1BB800083
BEE14CE1BB800084
3C624CE1BB800085
35144CE1BB800086
5BFF4CE1BB800087
300B4CE1BB800088
58DB4CE1BB800089
92D44CE1BB800090
1BE24CE1BB800091
95094CE1BB800092
23304CE1BB800093
041F4CE1BB800094
4E7D4CE1BB800095
B7A74CE1BB800096
0C904CE1BB800097
33244CE1BB800098
F32D4CE1BB800099
17494CE1BB800100
5C154CE1BB800101
ECB24CE1BB800102
C4D84CE1BB800103
47954CE1BB800104
BD6B4CE1BB800105
8CD94CE1BB800106
C9C64CE1BB800107
42234CE1BB800108
74424CE1BB800109
8E404CE1BB800110
417C4CE1BB800111
8A1B4CE1BB800112
41174CE1BB800113
A1494CE1BB800114
716F4CE1BB800115
3DD94CE1BB800116
A52D4CE1BB800117
6EEC4CE1BB800118
62034CE1BB800119
43814CE1BB800120
'''

ids_list = ids_text.strip().split('\n')
print ids_list

import pymongo

devices_services = pymongo.MongoClient().bora.devices_services

template = {
    u'services':
        [
            {
                u'expire_time': 1593532800,# 2020/7/1
                u'total_used_time': 0,
                u'last_pay_time': 1499504874,
                u'name': u'Drinking%20Fountain',
                u'first_pay_time': 1499504874
            }
        ],
    u'device_id': u'4E7D4CE1BB800095'
}

for did in ids_list:
    template[u'device_id'] = did
    devices_services.insert_one(template)
    del template['_id']
